Open
Conversation
3 tasks
592880d to
987a605
Compare
fbe3fa4 to
8891941
Compare
This is a preparatory commit so that switching from isort to ruff (which uses a compatible but not identical sort order) results in a minimal diff in the follow-up commit. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Drop the direct isort requirement and migrate the isort config to ruff config.
2318e2f to
7d9d2b7
Compare
isort:skip_file and isort:skip pragmas are not respected by ruff. Replace them with ruff equivalents: - File-level: # ruff: noqa: I001 (cms/__init__.py, cms/wsgi.py, openedx/core/lib/safe_lxml/etree.py, cms/conftest.py) - Line-level: # noqa: I001 (manage.py, cms/urls.py) We also added some suppressions to settings file where the wildcard import and other import ordering is important. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Mechanical changes produced by `ruff check --select I --fix .`: - adds trailing commas to multi-line import groups - converts backslash line continuations to parentheses Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When ruff auto-fixes expand single-line imports to multi-line (adding parentheses and trailing commas), inline pylint disables that were on the original line end up on the last item inside the parens rather than on the `from` statement. Pylint does not recognize these as suppressing the warning on the import. Affected issues: unused-import, reimported, redefined-outer-name, useless-import-alias, wrong-import-position. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
kdmccormick
approved these changes
Apr 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the standalone
isorttool with ruff's built-inI(isort) rules. Ruff's isort is compatible with—but not identical to—standalone isort, so this PR also normalizes the codebase before the switch.Commits:
chore: Run isort . before switching to ruff— one final isort pass against the latest codebase to minimize the diff from the ruff-style changes that followbuild: Replace isort with ruff— dropsisortfromrequirements/edx/testing.in, removes[tool.isort]frompyproject.toml, adds"I"to ruff'sselectlistfix: replace isort pragmas with ruff-equivalent noqa suppressions— converts# isort:skip/# isort:skip_fileto# noqa: I001; preserves star-import ordering in Django settings files where import order is semantically significantfix: apply ruff isort auto-fixes— runsruff check --select I --fixto apply the ~765 mechanical differences between isort and ruff style (trailing commas on multi-line imports, backslash → parentheses continuations)fix: add pylint inline disables broken by ruff import expansion— when ruff expands single-line imports to multi-line, inline# pylint: disablecomments move to the item line where pylint can't see them; this commit moves them to a line above thefromstatement🤖 Generated with Claude Code